﻿using Library.OrmEnterpriseEntity.TableInfo;

namespace Library.OrmEnterpriseEntity {
	public class QueryParmBuilder : ExpressionBuilder {
		public readonly DbColumnView Column;
		public readonly QueryOperator Operator;
		public readonly QueryParameter Parameter;
		public QueryParmBuilder(DbColumnView column, QueryOperator queryOperator, QueryParameter parameter) {
			Column = column;
			Operator = queryOperator;
			Parameter = parameter;
		}
		public QueryParmBuilder(DbColumnView column, QueryOperator queryOperator, object value) {
			Column = column;
			Operator = queryOperator;
			Parameter = new QueryParameter(column.DbType, value);
		}
		public override ExpressionType ExpType {
			get { return ExpressionType.Parm; }
		}
	}
}
